﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WPFLOBMVVM.View
{
    /// <summary>
    /// Interaction logic for EditContactItemsControlSelectionView.xaml
    /// </summary>
    public partial class EditContactItemsControlSelectionView : UserControl
    {
        public EditContactItemsControlSelectionView()
        {
            InitializeComponent();
            this.Loaded +=new RoutedEventHandler(EditContactItemsControlSelectionView_Loaded);
            this.Unloaded +=new RoutedEventHandler(EditContactItemsControlSelectionView_Unloaded);
        }


        

        private void EditContactItemsControlSelectionView_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            this.AddHandler(Hyperlink.ClickEvent, new RoutedEventHandler(Hyperlink_Click));
        }

        private void EditContactItemsControlSelectionView_Unloaded(object sender, System.Windows.RoutedEventArgs e)
        {
            this.RemoveHandler(Hyperlink.ClickEvent, new RoutedEventHandler(Hyperlink_Click));
        }

        private void Hyperlink_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            Keyboard.Focus(this.objContactView.txtFirstName);
        } 
    }
}
